package com.cjx.admin.feign;

import com.cjx.admin.dto.AdminUserDTO;
import com.cjx.admin.feign.impl.AdminUserFeignFallback;
import com.cjx.common.api.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
*@Description 授权模块-用户feign
*@Verson v1.0.0
*@Author cjunxian
*@Date
*/
@Component
@FeignClient(value = "cjx-admin-service",path = "/adminUser",fallback = AdminUserFeignFallback.class)
public interface AdminUserFeign {

    /**
     * 根据用户名获取信息
     * @param username
     * @return
     */
    @GetMapping("/getUserByUsername/{username}")
    CommonResult<AdminUserDTO> getUserByUsername(@PathVariable("username") String username);

}
